package com.exp.service;

import com.exp.dao.HotMapper;
import com.exp.dao.more.MoreHotMapper;
import com.exp.dao.more.MoreTopMapper;
import com.exp.model.Hot;
import com.exp.model.Top;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 Created by guojianyu on 2016/1/24.
 */
@Service
@Transactional
public class HotService {
 @Autowired
 private MoreHotMapper moreHotMapper;
 @Autowired
 private HotMapper hotMapper;
 public List<Hot> getList(Map<String, Object> params) {
  return moreHotMapper.getList(params);
 }
 public int delete(Integer id){
  return  hotMapper.deleteByPrimaryKey(id);
 }
 public int add(Hot hot){
  return hotMapper.insertSelective(hot);
 }
 public int update(Hot hot){
  return  hotMapper.updateByPrimaryKeySelective(hot);
 }
}
